#pragma once
#include "resource.h"
#define WM_SEND_MSG			WM_USER+1000
class CSendDlg : public CAxDialogImpl<CSendDlg>,public CUpdateUI<CSendDlg>,public CMessageFilter,public CIdleHandler
{
public:
	enum { IDD = IDD_DIALOG_SEND };
	CRichEditCtrl		m_edit_ctl;
	CHARFORMAT			m_cf;
	virtual BOOL PreTranslateMessage(MSG *pMSG)
	{
		if(m_hWnd)
			return CWindow::IsDialogMessage(pMSG);
		return false;
	}
	virtual BOOL OnIdle()
	{
		return false;
	}
	BEGIN_UPDATE_UI_MAP(CSendDlg)
	END_UPDATE_UI_MAP()

	BEGIN_MSG_MAP(CSendDlg)
		MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
		MESSAGE_HANDLER(WM_SIZE, OnSize)
		COMMAND_ID_HANDLER(IDC_BUTTON_SEND, OnSend)
		COMMAND_HANDLER(IDC_BUTTON_FONT, BN_CLICKED, OnBnClickedButtonFont)
		COMMAND_HANDLER(IDC_BUTTON_COLOR, BN_CLICKED, OnBnClickedButtonColor)
		CHAIN_MSG_MAP(CUpdateUI<CSendDlg>)
	END_MSG_MAP()
	LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
	LRESULT OnSize(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled);
	LRESULT OnSend(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
	LRESULT OnBnClickedButtonFont(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
	LRESULT OnBnClickedButtonColor(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
};